import Vue from 'vue'
// import moment from 'moment'
import Cookies from 'js-cookie'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import 'normalize.css/normalize.css'

import Element from 'element-ui'
import './styles/element-variables.scss'
import '@/styles/index.scss'

import App from './App'
import store from './store'
import router from './router'
import i18n from './language/i18n/index'


import './icons'
import './permission'
import './utils/error-log'

import * as filters from './filters'
import Print from 'vue-print-nb'
import VueBarcode from 'vue-barcode'

Vue.use(Print)
Vue.use(VueBarcode)
Vue.use(ElementUI)
Vue.prototype.$cookie = Cookies;
Vue.use(Element, {
  size: Cookies.get('size') || 'medium'
})

Object.keys(filters).forEach((key) => {
  Vue.filter(key, filters[key])
})
// Vue.prototype.$moment = moment

import layout from './directive/el-tabs/layout'
// 自定义指令
Vue.directive('layout', layout)

Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  i18n,
  render: (h) => h(App)
})
